#include<bits/stdc++.h>
using namespace std;
const int N = 200001;

int n,l,r;
int values[2*N];

int main(){
    scanf("%d%d%d",&n,&l,&r);
    memset(values,0,sizeof(values));
    for(int i=0;i<=n;i++) scanf("%d",&values[i]);
    deque<int> que;
    for(int i=n+r;i>=n+l+1;i--) que.push_back(i);
    for(int i=n;i>=0;--i){
        int j = i+l;
        while(!que.empty()&&que.front()-i>r) que.pop_front();
        while(!que.empty()&&values[j]>=values[que.back()]) que.pop_back();
        if(que.empty()){
            que.push_back(j);
            values[i] += values[j];
        }
        else{
            values[i] += values[que.front()];
            que.push_back(j);
        }
    }
    printf("%d\n",values[0]);
    return 0;
}